package com.yuqih.common.service.view;

public interface IViewConverter {

	String Alias_Date_Format = "dateFormat";
	String Alias_View_Service = "viewService";


	String alias();

	Object convert(Object source, Context context);

	public static class Context {

		private final boolean isList;
		private final Class<?> type;
		private final String param;

		public Context(boolean isList, Class<?> type, String param) {
			super();
			this.isList = isList;
			this.type = type;
			this.param = param;
		}

		/**
		 * @return the isList
		 */
		public boolean isList() {
			return isList;
		}

		/**
		 * @return the type
		 */
		public Class<?> getType() {
			return type;
		}

		/**
		 * @return the param
		 */
		public String getParam() {
			return param;
		}

	}
}
